if exists(select name from sysobjects where name = 'sp_TinGetByTinCungLoai')
	drop proc sp_TinGetByTinCungLoai
go
/*
	Created by: Phuoc NH
	Created on: 25/01/2013 (dd/mm/yyyy)
	Description: lay tin cung loai
	--
	File:$sql-scripts/Proc.sp_TinGetByTinCungLoai.sql
*/

create proc sp_TinGetByTinCungLoai
@Tin_id int

as
begin
	select Tin_id, Tieu_de, Ngay_tao from tbl_Tin where Tin_cha_id=( select Tin_cha_id from tbl_Tin where Tin_id=@Tin_id and Tin_cha_id<>0 and Status=1) and Status=1 
end